<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<title>禅疗堂官网</title>

<link href="../../css/bootstrap.css" rel="stylesheet">
<link rel="stylesheet" href="../../css/normalize.css">
<link rel="stylesheet" href="../../css/component.css">
<link rel="stylesheet" href="../../css/custom-styles.css">
<link rel="stylesheet" href="../../css/font-awesome.css">
<link rel="stylesheet" href="../../css/topMenu.css">
<link rel="stylesheet" href="../../css/message_stl.css">
 
 <link rel="stylesheet" href="../../css/demo.css">
<link rel="stylesheet" href="../../css/font-awesome-ie7.css">
<style>

</style>
  <script src="../../js/html5shiv.js"></script>
  <script src="../../js/respond.min.js"></script>
  <script>
</script>

</head>

<body>
<div class="header-wrapper">
  <div class="top_logo_sty"><img style="width:100px;" src="../../img/logo.jpg"/></div>
  <div class="site-name">
	<h1>禅疗堂健康咨询管理有限公司</h1>
	<h2>禅疗 禅美 禅修</h2>
  </div>
</div>
<div class="menu" id="menuId"></div>
<div class="container">
	<div class="menu_rtn_stl"><a href="../../index.html" class="rtn_a">首页</a> > <a href="###" class="rtn_a">我要报名</a> ><a href="###" class="rtn_a">我也报名</a><span id="miniMenuText"></span></div>
	<div class="featured-content">	   
	  <div class="signUp_div_stl">
		  <label class="lab_stl"> <span class="fn-high">*</span>姓名：</label>
		  <input type="text" class="input_width" placeholder="请输入姓名" maxlength="50" id="userNm" name="userNm" value=""/>
	  </div>
	  <div class="signUp_div_stl">
		  <label class="lab_stl"> <span class="fn-high">*</span>手机号码：</label>
		  <input type="text" class="input_width" placeholder="请输入手机号码" maxlength="11" id="userTelnum" name="userTelnum" value=""/>
	  </div>
	  <div class="signUp_div_stl">
		  <label class="lab_stl"> <span class="fn-high">*</span>选择想要参加的会议：</label>
		  <input type="hidden" id="meetId" name="meetId" value=""/>
		  <input type="hidden" id="meetTypeCd" name="meetTypeCd" value=""/>
		  <input type="text" class="input_width" disabled="disabled" placeholder="会议名称" id="meetNm" name="meetNm" value=""/>
		  <a class="sml_btn_stl" href="javascript:;" id="" onclick="checkMeetWin()">选择</a> 
	  </div>
	  <div class="signUp_div_stl">
		  <label class="lab_stl"> 报名类型：</label>
		  <select class="inputSelect" name="enrollTypeCd" id="enrollTypeCd">
                     <option value="">--请选择--</option>
                     <option value="1001">--禅修辟谷--</option>
                     <option value="1002">--回春功--</option>
                     <option value="1003">--禅美招商--</option>
                     <option value="1004">--经销商培训--</option>
                     <option value="1005">--中医技能培训--</option>
                     <option value="1006">--其他--</option>
          </select>		  
	  </div>
	  <div class="signUp_div_stl">
		  <label class="lab_stl"> QQ：</label>
		  <input type="text" class="input_width" placeholder="请输入QQ" maxlength="50" id="userQQ" name="userQQ" value=""/>
	  </div>
	  <div class="signUp_div_stl">
		  <label class="lab_stl"> 微信：</label>
		  <input type="text" class="input_width" placeholder="请输入微信" maxlength="50" id="userWeixin" name="userWeixin" value=""/>
	  </div>
	  <div class="signUp_div_stl">
		  <label class="lab_stl"> 家庭地址：</label>
		  <input type="text" class="input_width" placeholder="请输入家庭地址" maxlength="100" id="enrollAddr" name="enrollAddr" value=""/>
	  </div>
	  <div class="signUp_div_stl">
		  <label class="lab_stl"> 描述：</label>
		 <span style="margin-left:10px;"><textarea type="text" name="enrollDesc" id="enrollDesc" class="form-textarea"  placeholder="您的要求可以在此填写，请输入500字以内" style="marginn-left:10px;width: 500px;height: 130px;resize:none;" onblur="true" maxlength="500"></textarea></span>
	  </div>
	  <div class="signUp_div_stl">
		  <label class="lab_stl"> 推荐人：</label>
		  <input type="text" class="input_width" id="introducerPsn" maxlength="50" name="introducerPsn" value=""/>
	  </div>
	  <div class="signUp_div_stl">
		  <label class="lab_stl"> 推荐人电话：</label>
		  <input type="text" class="input_width" id="introducerTelnum" maxlength="20" name="introducerTelnum" value=""/>
	  </div>       
	  <div class="fn-center"> 
	  <span style="color:red;font-size:16px;margin-right:10px;">带 * 号为必填项</span>
	       <a class="btn_stl" href="javascript:;" id="J_save" onclick="save()">提&nbsp;&nbsp; 交</a> 
      </div> 
	</div>
</div> 
  <div class="" id="foodId"></div>
<div id="checkMeetWin" class="fn-hide">
	<div class="cmxform">
		<form class="record-search-form record-search-min record-search-form-border" id="J_formSearch" name="J_formSearch">
			<div class="record-search-cate">
				<table class="search_table" cellpadding="0" cellspacing="0" border="0" width="100%">
				 <tr class='hide_row'>
				    <td width="80">
                       <label class="description">会议标题</label>
                    </td>
                    <td width="200">
                        <input type="text" class="inputWidth130" name="meetNm" id="meetNm"/>
                    </td>
                    <td class="td-last-child">
                    	<a class="searchBtn" href="javascript:;" id="J_meetSearch" onclick="meetSearch();"><i></i>查询</a>
               		</td>
				 </tr>
			</table>
			</div>
		</form>
	</div>
	<section>
<div class="tablewidth mg_t_10" id="titleReport">
	 <table class="ui-record-table" width="95%">
        <thead id ="J_tableTile">   
        <tr>
            <th width="35">选择</th>
            <th width="100">会议标题</th>
            <th width="120">会议开始日期</th>
            <th width="120">会议结束日期</th>
            <th width="100">会议地址</th>
            <th width="100">会议人数</th>
            <th width="100">已报名人数</th>
            <th width="100">负责人</th> 
            <th width="100">电话</th>              
          </tr>       
        </thead>
        <tbody id="J_tabletpl"></tbody>
        </table>
      </div>
      <!-- <div style="height:100px"></div> -->
    </section>  
    <!--翻页及功能按钮区域开始-->
    <DIV class="" >
        <table class="" width="95%" border="0" cellspacing="0" cellpadding="0">
          <tr>
			<td class="ta_l"></td>
            <td width="50%">
                <DIV class="fn-clear action-other">
                        <DIV id="pagination" class="page pagination fn-right"></DIV>
                        <DIV class="fn-right fn-pt5 fn-pr10"></DIV>
                </DIV></td>
          </tr>
        </table>
    </DIV>
</div>

<script id="T_tabletpl" type="text/x-handlebars-template">
	{{#if beans}}
	  {{#each beans}}
        <tr>
            <td width="25" align="center"><input type="radio" name="meetRadio" attr_meetTypeCd="{{meetTypeCd}}" attr_meetNm="{{meetNm}}" value="{{meetId}}"/></td>
			<td width="100"><a href="javascript:void(0);" onclick ="meetDtlWin('{{meetId}}');">{{meetNm}}</a></td>
            <td width="100">{{meetBgnTime}}</td>
			<td width="100">{{meetEndTime}}</td>
			<td width="100">{{meetAddr}}</td>
			<td width="100">{{meetPeopleNum}}</td>
			<td width="100">{{signUpPrsnnum}}</td>
			<td width="100">{{meetPersn}}</td>
            <td width="100">{{consultTelnum}}</td>
        </tr>		
	  {{/each}}	
	{{else}}
	<tr>
		<td colspan="9">
			<div class="ui-tips-box a">
				<div class="ui-icon-noData"></div>
				<div class="ui-tips-text">暂无数据记录！</div>
			</div>
		</td>
	</tr>
    {{/if}}
	</script>
<script src="../../js/jquery-1.9.1.js"></script>
<script src="../../js/bootstrap.js"></script>
<script src="../../js/modernizr-2.6.2-respond-1.1.0.min.js"></script>
<script src="../../lib/layer/2.1/layer.js"></script> 
<script src="../../js/lib.min.js"></script>
<script src="../../js/requirejsConfigObj.js"></script>
<script src="../../js/requirejs/2.1.17.js"></script>
<script src="../../js/common.min.js"></script>
<script src="../../lib/handlebars.js"></script>
<script src="../../js/self_fun.js"></script>
<script>
	
	function inint(){
		var str = $("#" + G_params.searchformId).serialize(); //把form序列化
		Util.pagination(0, true,G_params, str);
	}
	function save(){
		var userNm = $("#userNm").val();
		var enrollAddr = $("#enrollAddr").val();
		var userTelnum = $("#userTelnum").val();
		var introducerPsn = $("#introducerPsn").val();
		var userQQ = $("#userQQ").val();
		var userWeixin = $("#userWeixin").val();
		var meetId = $("#meetId").val();
		var enrollTypeCd = $("#enrollTypeCd").val();
		var introducerTelnum = $("#introducerTelnum").val();
		var enrollDesc = $("#enrollDesc").val();
		if(isDataNull(userNm)){
		   	 top.Util.dialog.tips('请填写姓名！');
		   	 return;
	   	} 
		if(isDataNull(userTelnum)){
	    	 top.Util.dialog.tips('请填写电话！');
	    	 return;
	    }   
		var param={
	   		 'userNm' :userNm,
	   		 'enrollAddr' :enrollAddr,
	   	     'userTelnum':userTelnum,
	   	     'introducerPsn':introducerPsn,
	   	     'userQQ':userQQ,
	   	     'userWeixin':userWeixin,
	   	     'meetId':meetId,
	   	     'enrollTypeCd':enrollTypeCd,
	   	     'enrollDesc':enrollDesc,
	   	     'introducerTelnum':introducerTelnum
	   	     
	    }   
	   Util.ajax.postJsonSync("/addEnrollInfo",param,function(json,status){
	          if(status){
	       	   if(json.bean.rtnCd == "00"){	       		   
	       			/* var msgDel = {
		                    id: 'publishConfirm', //弹出对话框的id
		                    title: '提示信息', //左上角提示标题
		                    content: '报名成功', //具体提示内容
		                    okVal: '返回首页', //确认按钮文本
		                    okCallback: function() { //确认按钮点击过之后执行的函数
		                      	window.location.href = "../../index.html";
		                    },
		                    cancelVal: '继续报名', //取消按钮文本
		                    cancelCallback: function() {} //取消按钮点击后执行的函数
		                };
		                Util.dialog.confirm(msgDel); */
	       		//默认prompt

	       		layer.confirm('报名成功', {
		       		  btn: ['返回首页', '继续报名'] ,//可以无限个按钮
			       	  yes:function(index,layero){
			       		window.location.href = "../../index.html";
			       	  },
		       		  btn2: function(index, layero){}	       			     		
	       		});
	              }else{              
	            	  top.Util.dialog.tips("报名失败",top,2000);
	              }
	          }else{
	        	  top.Util.dialog.tips("报名失败",top,2000);
	          }
	    }); 
	}
	var G_params = {
			url : '/getMeetLIst',
			items_per_page : 10,   		// 每页数     @param : limit
			page_index : 0 , 
			pagination: "pagination", //分页id
			searchformId : "J_formSearch", //搜索表单的id
			tabletpl : "T_tabletpl", //表格模板
			tablewrap : "J_tabletpl" //表格容器
	};
	function checkMeetWin(){		
		var checkMeetList = document.getElementById('checkMeetWin');
		var checkMeetInfo = {
			id : 'D_checkMeetList',
			title : '选择',
			content : checkMeetList,
			width: '1000', //对话框宽度
		    height: '500', //对话框高度
		    okVal: '确定', //确认按钮文本
            okCallback: function() { //确认按钮点击过之后执行的函数
            	var meetId = $('#J_tabletpl input[name="meetRadio"]:checked').val();
            	var meetTypeCd = $('#J_tabletpl input[name="meetRadio"]:checked').attr('attr_meetTypeCd');
            	var meetNm = $('#J_tabletpl input[name="meetRadio"]:checked').attr('attr_meetNm');
            	$("#enrollTypeCd").val(meetTypeCd);
            	$("#meetId").val(meetId);
            	$("#meetNm").val(meetNm);
            },
		    cancelVal: '取消', //取消按钮文本
            cancelCallback: function() {}, //取消按钮点击后执行的函数
		    modal: true
		}
		Util.loading.create('body',"正在加载，请稍候。。。"); 
        Util.dialog.openDiv(checkMeetInfo);       
        Util.loading.close('body');
		
	}
	function meetSearch(){
		var str = $("#" + G_params.searchformId).serialize(); //把form序列化
		Util.pagination(0, true,G_params, str);
	}	
</script>
</body>
</html>
